import request from '@/utils/request'

// 查询ai对话历史信息列表
export function listHistory(query) {
  return request({
    url: '/aihistory/history/list',
    method: 'get',
    params: query
  })
}

// 查询ai对话历史信息详细
export function getHistory(id) {
  return request({
    url: '/aihistory/history/' + id,
    method: 'get'
  })
}

// 新增ai对话历史信息
export function addHistory(data) {
  return request({
    url: '/aihistory/history',
    method: 'post',
    data: data
  })
}
export function addHistoryRedis(message) {
  return request({
    url: '/embedding/redisHistory',
    method: 'post',
    params: message
  })
}

// 修改ai对话历史信息
export function updateHistory(data) {
  return request({
    url: '/aihistory/history',
    method: 'put',
    data: data
  })
}

// 删除ai对话历史信息
export function delHistory(id) {
  return request({
    url: '/aihistory/history/' + id,
    method: 'delete'
  })
}
